from Action.SpriteWelcome import WelcomeSprite
from Scene.BaseScene import BaseScene, ScenePassStatus


class WinScene(BaseScene):
    """
    胜利场景
    """
    def __init__(self, win_sprite):
        super(WinScene, self).__init__(win_sprite,
                                       "../Resources/images/win/win.jpg")
        self.actor = WelcomeSprite(50, 300, "../Resources/images/win/w_%d.png", 7)

    def draw_actor(self):
        self.actor.draw(self.current_surface)

    def run(self, down_flag, key_list):
        self.actor.run(down_flag, key_list)
        if self.actor.pos_x > 1000:
            self.pass_status = ScenePassStatus.over

    def get_pass_status(self):
        if self.pass_status != ScenePassStatus.over:
            return self.pass_status, None

